package org.flyframework.command
{
	import flash.events.Event;
	
	
	public class FlyCommander
	{
		
		[Bindable]
		public var history:History = new History();
		
		[Bindable]
		public var mappings:Object;
		
		
		//--------------------------------------------------------------------------
		// Init
		//--------------------------------------------------------------------------
		
		public function FlyCommander()
		{
			
		}
		
		
		//--------------------------------------------------------------------------
		// Public
		//--------------------------------------------------------------------------
		
		public function execute( cmd:ICommand, event:Event=null ):void
		{
//			cmd.addEventListener( type, listener );
			
			this.history.execute( cmd, event );
		}
		
		public function undo( event:Event=null ):void
		{
			this.history.undo( event );
		}
		
		public function redo( event:Event=null ):void
		{
			this.history.redo( event );
		}
		
	}
}